** Replication data for "Citations to Interest Groups and Acceptance of Supreme Court Decisions" Journal of Empirical Legal Studies. Kayla S. Canelo 

** Analyses performed in Stata/MP 15.1 for Mac (64-bit Intel)

** Load Data 
	cd /Users/user/Desktop/ 
	use "JELS_replication_data.dta"

** Legitimacy Hypotheses 
	** Table 2 in manuscript
		regress AcceptDec i.CitationCondition i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow diffuse FailedManip, robust
	
	** T-Tests mentioned on page 198 and 199 of manuscript
		ttest lawpol, by(IdeoOvertCite)
		ttest lawpol, by(IdeoModCite)
		
** Compatability Hypothesis 
	** Table 3 in manuscript 
		regress AcceptDec i.Congruence i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow diffuse FailedManip, robust

	
** APPENDIX MATERIALS 

	** A3 Descriptive stats
		sum age, d
		tab race
		tab education
		tab gender
		tab votereg
		tab partyid
		tab PoliKnow
		tab ideology
	
	** A5 Model Specification for Tables 1 and 2 in manuscript 
		* Corresponds to Table 1 in Manuscript
			regress AcceptDec i.CitationCondition i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow diffuse FailedManip
			estat hettest
		* Table A2 in appendix 
			estat vif
			
		* Corresponds to Table 2 in Manuscript 
			regress AcceptDec i.Congruence i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow diffuse FailedManip 
			estat hettest
		* Table A3 in appendix 
			estat vif
			
	** A6: Ordered Logit Robustness Checks 
		* Table A4 in appendix 
			ologit AcceptDec i.CitationCondition i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow diffuse FailedManip, robust
		
		* Table A5 in appendix 
			ologit AcceptDec i.Congruence i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow diffuse FailedManip, robust
			
	** A7: Analyeses Using Difference of Means Tests
		** Overt citations compared to control (corresponds to left side of Figure A1)
			ttest AcceptDec, by(IdeoOvertCite)
			
			cibar AcceptDec, over1(IdeoOvertCite) level(90) graphopts(legend(order(1 "Control (No Citation)" 2 "Ideological Citation")) yscale(range(2.75(.05)3)) ylabel(2.75 2.8 2.85 2.9 2.95 3, valuelabel) title("Ideological Citations Compared to No Citation") ytitle("Acceptance of the Decision"))
		
		** Moderate citation compared to control (corresponds to right side of Figure A1)
			ttest AcceptDec, by(IdeoModCite)
			
			cibar AcceptDec, over1(IdeoModCite) level(90) graphopts(legend(order(1 "Control (No Citation)" 2 "Moderate Citation")) yscale(range(2.75(.05)3)) ylabel(2.75 2.8 2.85 2.9 2.95 3, valuelabel) title("Moderate Citation Compared to No Citation") ytitle("Acceptance of the Decision"))

		** Ideologically Compatible citation compared to control (corresponds to left side of Figure A2)
			ttest AcceptDec, by(CongruentCite)
			
			cibar AcceptDec, over1(CongruentCite) level(90) graphopts(legend(order(1 "Control (No Citation)" 2 "Ideologically Compatible Citation")) yscale(range(2.75(.05)3)) ylabel(2.75 2.8 2.85 2.9 2.95 3, valuelabel) title("Ideologically Compatible Citation Compared to No Citation") ytitle("Acceptance of the Decision"))
			
		** Ideologically Incompatibke citation compared to control (corresponds to right side of Figure A2)
			ttest AcceptDec, by(IncongruentCite)	
			
			cibar AcceptDec, over1(IncongruentCite) level(90) graphopts(legend(order(1 "Control (No Citation)" 2 "Ideologically Incompatible Citation")) yscale(range(2.75(.05)3)) ylabel(2.75 2.8 2.85 2.9 2.95 3, valuelabel) title("Ideologically Incompatible Citation Compared to No Citation") ytitle("Acceptance of the Decision"))

			
	** A8: Balance Tests
		** Table A6
			pstest regvote age white education Female IdeologyRecode party1 party2 party3 dd1 dd2 dd3 CourtKnow diffuse,treated(IdeoOvertCite) raw 
		** Table A7
			pstest regvote age white education Female IdeologyRecode party1 party2 party3 dd1 dd2 dd3 CourtKnow diffuse,treated(IdeoModCite) raw 
		** Table A8
			pstest regvote age white education Female IdeologyRecode party1 party2 party3 dd1 dd2 dd3 CourtKnow diffuse,treated(IncongruentCite) raw 
		** Table A9
			pstest regvote age white education Female IdeologyRecode party1 party2 party3 dd1 dd2 dd3 CourtKnow diffuse,treated(CongruentCite) raw 

	** A9 Matched Data Analysis 
		* load matched dataset 
			cd /Users/user/Desktop/ 
			use "JELS_matched_replication_data.dta"
		
		* Corresponds to Figure A3
			ttest acceptdec, by(ideoovertcite)
			
		* Figure A3
			cibar acceptdec, over1(ideoovertcite) level(90) graphopts(legend(order(1 "Control (No Citation)" 2 "Ideological Citation")) yscale(range(2.75(.05)3)) ylabel(2.75 2.8 2.85 2.9 2.95 3, valuelabel) ytitle("Acceptance of Decision") title("Ideological Citation Compared to No Citation"))
			
		* Politicization question mentioned on page 218
			logit law ideoovert
	
		** Reload original data 
			use "JELS_replication_data.dta"
	
			** Analyses with data that could not be matched well 
			
				** Moderate Citations (mentioned on page 218 and 219 in appendix) 
					regress AcceptDec IdeoModCite i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow diffuse if FailedManip==0, robust
		
				** Table A11 
					regress AcceptDec i.Congruence i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow diffuse if FailedManip==0, robust


	** A10 General Acceptance of Decisions
		** Table A12
			** Moderate Decision Direction 
				regress AcceptDec Female white education CourtKnow IdeologyRecode RepLean DemLean regvote AwareRetireName diffuse if TrueControl==1		
			** Conservative Decision Direction
				regress AcceptDec Female white education CourtKnow IdeologyRecode RepLean DemLean regvote AwareRetireName diffuse if ConsControl==1		
			** Liberal Decision Direction 
				regress AcceptDec Female white education CourtKnow IdeologyRecode RepLean DemLean regvote AwareRetireName diffuse if LibControl==1		

		** Table A13
			tabstat AcceptDec, by(study_conditions)	
		
	** A11: Citations Interaction with Diffuse Support 
		** Figure A4 
			regress AcceptDec i.CitationCondition##c.diffuse i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow FailedManip, robust
				margins, dydx(i.CitationCondition) at(diffuse=(-1.75(.25)1.75))
				marginsplot, yline(0) legend(order(1 "Ideological Citation" 2 "Moderate Citation"))
	
		** Table A14 
			** Model 1 High Diffuse Support
				regress AcceptDec i.CitationCondition i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow if highdiff==1, robust
			** Model 2 Low Diffuse Support
				regress AcceptDec i.CitationCondition i.DecisionDirection IdeologyRecode regvote age white education Female i.Party CourtKnow if lowdiff==1, robust

